{% extends "base.html" %}
{% load thumbnail %}

{% block extra_head %}
<meta property="pageId" content="{{ installer.slug }}" />
{% thumbnail installer.game.title_logo "300" as img %}
<link rel='image_src' href="{{img.url}}">
<meta property='og:image' content="{{img.url}}" />
{% endthumbnail %}
<meta property='og:title' content="{{ installer.game.name }} ({{ installer.version}})" />
<meta property='og:site_name' content='Wine游戏助手' />
<meta name="title" content="{{ installer.game.name }} ({{ installer.version }}) - Wine游戏助手" />
<meta name="description" content="{{ installer.game.name }} ({{ installer.version }}) - Wine游戏助手" />
<meta property="og:description" content="{{ installer.game.name }} ({{ installer.version }}) - Wine游戏助手" />
{% endblock extra_head %}

{% block content %}
<h1>Installer {{installer.slug}}</h1>
<div class='row'>
  <div class="col-lg-10 col-lg-offset-1">
    <p>
      该脚本仅供阅读，不能直接用来在Wine游戏助手中安装游戏。<br>
      要通过命令安装游戏，请<a href="{% url 'api_game_installer_list' slug=installer.slug %}?format=json">下载完整脚本</a>。<br>
      安装命令：<code>/opt/apps/net.winegame.client/files/bin/winegame -i ./xxx.json</code>
    </p>
    <ul class="nav nav-tabs" role="tablist">
      <li role="presentation" class="active">
        <a href="#installer-yaml" aria-controls="installer-yaml" role="tab" data-toggle="tab">YAML</a>
      </li>
      <li role="presentation">
        <a href="#installer-json" aria-controls="installer-json" role="tab" data-toggle="tab">JSON</a>
      </li>
    </ul>
    <div class="tab-content">
      <div role="tabpanel" class="tab-pane active" id="installer-yaml">
        <pre>{{installer.as_cleaned_yaml}}</pre>
      </div>
      <div role="tabpanel" class="tab-pane" id="installer-json">
        <pre>{{installer.as_cleaned_json}}</pre>
      </div>
    </div>
    <a class="btn" href="{% url "game_detail" slug=installer.game.slug %}">返回游戏</a>
  </div>
</div>
{% endblock content %}

